package com.yunshang.shoppingmall.mapper;

import com.yunshang.shoppingmall.entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer userId);

    int insert(User user);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer userId);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    //用户手机号查询用户
    User selectUserByPhone(@Param("phone") String phone);
    User selectUserByOpenid(@Param("openid") String openid);
    User selectPhoneByUserNo(@Param("userNo") String userNo);
    List<User> selectUserNoByPhone1(@Param("phone") String phone);

    //查询所有用户
    List<User> selectUserList();

    List<User> seachUserListByUserIdOrUserName(User user);

    //查询所有用户
    List<User> selectUserListPhone();

    //根据手机号查询用户
    List<User> selectUserListByPhone(String phone);

}